Repository navigation
Modernize for Ruby 3.3+ / fog-core 2 (0.6.0) - #7
Merged
Merged
Conversation
The gem could not run on any supported Ruby: OpenSSL::Digest::Digest and
Base64 are gone, minitest 6 dropped MiniTest::, codeclimate-test-reporter
is dead and `rake test` globbed a non-existent tests/ directory (0 tests).
- require Ruby >= 3.3, fog-core ~> 2.1, fog-xml ~> 0.1; drop fog-json
- move development dependencies from the gemspec to the Gemfile
- ship only lib/ and docs in the gem; point metadata at fog/fog-akamai
- sign requests with OpenSSL::Digest.new('SHA256') and pack('m0')
- require securerandom/openssl/cgi/escape explicitly, drop DateTime
- fix path_and_body_guard raising NoMethodError instead of ArgumentError
- minitest 6, minitest-mock, webmock 3, timecop 0.9, SimpleCov
- Rakefile runs test/**/*_test.rb and rubocop
- remove rvm gemset and the Ruby 1.8.7 Gemfile; ignore built *.gem
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fog-core 2 looks up providers as Fog::<Provider>::<Service> and logs two [fog][DEPRECATION] lines on every Fog::Storage.new when only the legacy Fog::Storage::<Provider> layout exists (~100 lines per test run). - Fog::Akamai autoloads Storage so fog-core's const_defined? check passes - requests, models and the service class move under Fog::Akamai::Storage - parsers move to Fog::Parsers::Akamai::Storage (internal, no alias) - Fog::Storage::Akamai stays as a deprecated alias of the new class - tests cover the real and mock services, the absence of deprecation output on load (subprocess) and on Fog::Storage.new, and the alias Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- .rubocop.yml: TargetRubyVersion 3.3, NewCops enabled, Layout/LineLength (renamed from Metrics/LineLength), extension suggestions off - add frozen_string_literal comments; freeze VALID_ACTIONS (%i[] literal) - fail -> raise, if/else raise -> guard clauses, expand_path with __dir__ - tests: open fixture files lazily or in a block instead of leaking handles in setup, drop the numeric suffix from a test name - symlink.rb: replace the empty Mock class with a comment pointing at #3 Autocorrected changes were reviewed for behavior: all are equivalent rewrites; tests pass unchanged on Ruby 3.3, 3.4 and 4.0. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
.travis.yml never ran (line 1 was `nguage: ruby`) and targeted Ruby 1.8.7-2.2; codeclimate-test-reporter is discontinued. - ci.yml: tests on Ruby 3.3/3.4/4.0, RuboCop, and a non-blocking job against fog-core and fog-xml master (gemfiles/Gemfile-edge) - dependabot.yml: weekly bundler and github-actions updates - gemfiles/Gemfile-edge: add rubocop (the Rakefile requires it); ignore generated gemfiles/*.lock Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- README: drop the gem-generator boilerplate and Code Climate badges, add a CI badge, fix the example (Fog::Storage.new, not Fog::Compute.new), document explicit credentials, Ruby >= 3.3 and the 0.5 upgrade note, point contributing at fog/fog-akamai (#6) - CHANGELOG.md: new, describes the 0.6.0 changes - version 0.6.0 - gemspec: drop redundant homepage_uri/source_code_uri metadata, which made `gem build` warn Closes #2, closes #6 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The gem has been dormant since 2016 and no longer runs on any supported Ruby. This brings it up to date and prepares a 0.6.0 release.
What was broken
OpenSSL::Digest::DigestandBase64are gone on current Rubies, so request signing raisedMiniTest::, andcodeclimate-test-reporteris discontinuedrake testglobbed a non-existenttests/directory and ran 0 tests[fog][DEPRECATION]lines on everyFog::Storage.new(~100 per test run).travis.ymlnever ran (line 1 wasnguage: ruby)What changed (one commit per area, so it reviews well commit by commit)
OpenSSL::Digest.new('SHA256')+pack('m0')for signing, explicitsecurerandom/cgi/escaperequires, minitest 6 / webmock 3 / SimpleCov. Also fixesArgumentError('body is required'), which raisedNoMethodError.Fog::Akamai::Storage(what fog-core 2 expects).Fog::Storage::Akamaistays as a deprecated alias.Fog::Storage.new(provider: 'akamai')is unchanged.Fog::Computeexample fixed, badges, upgrade note), new CHANGELOG, version 0.6.0.Breaking changes
Test plan
bundle exec rake(tests + RuboCop) is greenFog::Storage.new, real/mock classes under the new namespace, deprecated alias warns and resolves,nilbody raisesArgumentErrorlib/, README, LICENSE, CHANGELOG (no tests/PDF); installed into an isolatedGEM_HOMEand exercised in mock and real mode; the signature matches the known-answer test vectorCloses #2, closes #6
Not addressed here: #3 (symlink mock), and the
File#get/File#destroystubs.🤖 Generated with Claude Code